-- @owner: z@wan005
-- @date: 2023/5/18
-- @testpoint: uncompressed_length函数作为关键字测试
--step1:查询系统表;expect:uncompressed_length不是关键字
select * from pg_get_keywords() where word ='uncompressed_length';
--step2:作为数据库名;expect:成功
drop database if exists uncompressed_length;
create database uncompressed_length dbcompatibility 'B';
drop database if exists uncompressed_length;
--step3:作为列名和表名;expect:成功
drop table if exists uncompressed_length;
create table uncompressed_length(uncompressed_length timestamp);
drop table if exists uncompressed_length;
--step4:作为外部数据源名;expect:成功
drop data source if exists uncompressed_length;
create data source uncompressed_length;
drop data source if exists uncompressed_length;
--step5:作为自定义函数名;expect:成功
drop function if exists uncompressed_length(i integer);
create function uncompressed_length(i integer)
returns integer
as $$
begin
    return i+1;
end;
$$ language plpgsql;
/
drop function if exists uncompressed_length(i integer);
--step6:作为用户名;expect:成功
drop user if exists uncompressed_length;
create user uncompressed_length password 'Test_123';
drop user if exists uncompressed_length;